<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>标准盒模型</title>

    <style>
        .one{
            width: 40px;
            height: 40px;
            background: tomato;
            border: 10px solid red;
            padding: 20px;
            /*这里边框和内间距会占据元素大小*/
        }

        /*怪异盒模型*/
        .two{
            margin-top: 10px;
            width: 100px;
            height: 100px;
            /*设置成怪异盒模型,那盒子的模型就不会占据元素的大小*/
            box-sizing: border-box;
            border: 5px solid red;
            padding: 10px;

        }

    </style>


</head>
<body>


<div class="one">我是内容</div>
<div class="two">怪异盒</div>

</body>
</html>